package com.shensi.appCollect.service.impl;

import com.shensi.appCollect.dao.StationClassStructureMapper;
import com.shensi.appCollect.pojo.StationClassStructure;
import com.shensi.appCollect.service.IStationClassStructureService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 班结管理Service业务层处理
 *
 * @author qujia
 * @date 2020-12-31
 */
@Service("IStationClassStructureService")
public class StationClassStructureServiceImpl implements IStationClassStructureService
{
    @Resource
    private StationClassStructureMapper stationClassStructureMapper;

    @Override
    public StationClassStructure selectSummyByPayOrder(StationClassStructure stationClassStructure) {
        return stationClassStructureMapper.selectSummyByPayOrder(stationClassStructure);
    }

    //批量插入
    @Override
    public int insertStationClassStructureBatch(@Param("stationClassStructureList") List<StationClassStructure>  stationClassStructureList) {
        return stationClassStructureMapper.insertStationClassStructureBatch(stationClassStructureList);
    }

    //获取要班结的总和信息
    @Override
    public List<Map<String, String>> selectClassStructureSum(StationClassStructure stationClassStructure) {
        return stationClassStructureMapper.selectClassStructureSum(stationClassStructure);
    }

    /**
     * 查询班结管理
     *
     * @param id 班结管理ID
     * @return 班结管理
     */
    @Override
    public StationClassStructure selectStationClassStructureById(Long id)
    {
        return stationClassStructureMapper.selectStationClassStructureById(id);
    }

    /**
     * 查询班结管理列表
     *
     * @param stationClassStructure 班结管理
     * @return 班结管理
     */
    @Override
    public List<StationClassStructure> selectStationClassStructureList(StationClassStructure stationClassStructure)
    {
        return stationClassStructureMapper.selectStationClassStructureList(stationClassStructure);
    }

    /**
     * 新增班结管理
     *
     * @param stationClassStructure 班结管理
     * @return 结果
     */
    @Override
    public int insertStationClassStructure(StationClassStructure stationClassStructure)
    {
        return stationClassStructureMapper.insertStationClassStructure(stationClassStructure);
    }

    /**
     * 修改班结管理
     *
     * @param stationClassStructure 班结管理
     * @return 结果
     */
    @Override
    public int updateStationClassStructure(StationClassStructure stationClassStructure)
    {
        return stationClassStructureMapper.updateStationClassStructure(stationClassStructure);
    }

    /**
     * 批量删除班结管理
     *
     * @param ids 需要删除的班结管理ID
     * @return 结果
     */
    @Override
    public int deleteStationClassStructureByIds(Long[] ids)
    {
        return stationClassStructureMapper.deleteStationClassStructureByIds(ids);
    }

    /**
     * 删除班结管理信息
     *
     * @param id 班结管理ID
     * @return 结果
     */
    @Override
    public int deleteStationClassStructureById(Long id)
    {
        return stationClassStructureMapper.deleteStationClassStructureById(id);
    }

    /**
     * listPersonnelStructure
     * @param stationClassStructure
     * @return
     */
    @Override
    public List<StationClassStructure> listPersonnelStructure(StationClassStructure stationClassStructure) {
        return stationClassStructureMapper.listPersonnelStructure(stationClassStructure);
    }

    /**
     * 查询该油站最大的班结id
     * @param classes
     * @return
     */
    @Override
    public StationClassStructure selectStationClassStructureMax(StationClassStructure classes) {
        return stationClassStructureMapper.selectStationClassStructureMax(classes);
    }

    /**
     *
     * @param stationClassStructure
     * @return
     */
    @Override
    public List<StationClassStructure> listOilStructure(StationClassStructure stationClassStructure) {
        return stationClassStructureMapper.listOilStructure(stationClassStructure);
    }

    /**
     * 查询今天班结了几次生成班结
     * @param classesStructure
     * @return
     */
    @Override
    public StationClassStructure selectDistnctClassStructure(StationClassStructure classesStructure) {
        return stationClassStructureMapper.selectDistnctClassStructure(classesStructure);
    }

    /**
     * 根据班次号查询班结汇总
     * @param scs
     * @return
     */
    @Override
    public StationClassStructure selectSummyClassStructure(StationClassStructure scs) {
        return stationClassStructureMapper.selectSummyClassStructure(scs);
    }

    @Override
    public List<StationClassStructure> listPersonnelPayStructure(StationClassStructure stationClassStructure) {
        return stationClassStructureMapper.listPersonnelPayStructure(stationClassStructure);
    }

    @Override
    public StationClassStructure listClass(StationClassStructure stationClassStructure) {
        return stationClassStructureMapper.listClass(stationClassStructure);
    }

    /**
     * 导出数据
     * @param stationClassStructure
     * @return
     */
    @Override
    public List<StationClassStructure> selectStationClassStructureExport(StationClassStructure stationClassStructure) {
        return stationClassStructureMapper.selectStationClassStructureExport(stationClassStructure);
    }

    /**
     * 根据支付方式汇总数据
     * @param classStructure
     * @return
     */
    @Override
    public List<StationClassStructure> listPayStructure(StationClassStructure classStructure) {
        return stationClassStructureMapper.listPayStructure(classStructure);
    }

}
